package com.roc.admin.domain.service.impl;

import com.roc.admin.domain.entity.User;
import com.roc.admin.domain.service.UserDomainService;
import com.roc.admin.domain.valueobject.UserPermission;
import org.springframework.stereotype.Service;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

@Service
public class UserDomainServiceImpl implements UserDomainService {

    @Override
    public User createUser(User user) {
        // 实现创建用户的逻辑
        return user;
    }

    @Override
    public User updateUser(User user) {
        // 实现更新用户的逻辑
        return user;
    }

    @Override
    public void deleteUser(Long userId) {
        // 实现删除用户的逻辑
    }

    @Override
    public boolean changePassword(Long userId, String oldPassword, String newPassword) {
        // 实现修改密码的逻辑
        return true;
    }

    @Override
    public void resetPassword(Long userId, String newPassword) {
        // 实现重置密码的逻辑
    }

    @Override
    public Set<UserPermission> getUserPermissions(Long userId) {
        // 实现获取用户权限的逻辑
        return new HashSet<>();
    }

    @Override
    public void assignRoles(Long userId, List<Long> roleIds) {
        // 实现分配角色的逻辑
    }
}